package com.hy.appbase.apiresult;

import lombok.Data;

/**
 * Created by king on 2017/12/9.
 */
@Data
public class ApiDataResult extends ApiResult{

    private Object data;

    public ApiDataResult(int status, String message, Object data) {
        super(status, message);
        this.data = data;
    }

    public static ApiDataResult SUCCESS(Object data) {
        return new ApiDataResult(ApiResultType.SUCCESS.getValue(), ApiResultMessage.SUCCESS.getMessage(), data);
    }

    public static ApiDataResult SUCCESS(Object data, String message) {
        return new ApiDataResult(ApiResultType.SUCCESS.getValue(), message, data);
    }
}
